package com.yilu.driver.mvp.contract;


import com.is.common.base.BaseModel;
import com.is.common.base.BasePresenter;
import com.is.common.base.BaseView;
import com.is.common.retrofitrxcache.RxCacheResult;
import com.yilu.driver.entity.LoginResponse;
import org.json.JSONObject;
import rx.Observable;

/**
 * 登录
 * @author Administrator
 * @date 2017/4/10 0010
 */

public interface LoginContract {
    /**
     * 请求登录
     */
   interface Model extends BaseModel{
       Observable<RxCacheResult<LoginResponse>> login(JSONObject json);
   }

    /**
     * 返回登录的信息
     */
    interface View extends BaseView {
        void returnLogin(LoginResponse loginResponse);
    }

    /**
     * 发起登录请求
     */
    abstract class Presenter extends BasePresenter<View, Model> {
        public abstract void sendLogin(JSONObject json);
    }
}
